<html><head>
<meta charset="UTF-8">
<title>图形验证码</title>
</head>
<body>

	<div id="v_container" style="width: 200px;height: 50px;"><canvas width="200" height="50" id="verifyCanvas" style="cursor: pointer;">您的浏览器版本不支持canvas</canvas></div>
	<input id="code_input" type="text" value=""><button id="my_button">验证</button>

	<script src="js/gVerify.js"></script>
	<script>
		var verifyCode = new GVerify("v_container");

		document.getElementById("my_button").onclick = function(){
			var res = verifyCode.validate(document.getElementById("code_input").value);
			if(res){
				alert("验证正确");
			}else{
				alert("验证码错误");
			}
		}
	</script>



</body></html>